package com.zpark.mapper;

import com.zpark.pojo.Ranking;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;


import java.util.List;
@Repository
public interface IRankingMapper extends JpaRepository<Ranking,Integer>, JpaSpecificationExecutor {
    //JpaRepository<T,ID> 中T为数据库实体类，ID为数据库实体类的主键类型
    //自己写sql
    @Query(value = "select * from ranking1 where film_name = ?1", nativeQuery=true)
    List<Ranking> findByfilmName(String filmName);
}
